Add multi-os support for Travis CI

Currently also contains commits from #235 as they're required for the build.