Fixes to build scripts

It is now successfully building on Travis CI