Fixed build script to correctly source g++ path on both OSX and Linux