Enable Travis matrix builds and fix build script