Move library linking to end of g++ invocation

See http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html

The protoc and protobuf libraries are linked in the middle of the g++ invocation which will cause them to not compile in certain systems.