Add Travis build matrix and fix build script