Updated build script (prefix parsing, OSX switch).