Updated build-scripts for OSX and Linux.