Update build script for Linux/OSX