You don't necessarily have to compile vmods if the binaries for them are already available for your platform. Both CentOS 6 and 7 can leverage COPR builds by Ingvar in order to install a collection of extra modules by Varnish Software: https://copr.fedorainfracloud.org/coprs/ingvar/varnish51/