Add Travis build support for linux and NaCl

This branch fixes existing build errors on linux and NaCl and adds a travis config
file for continuous integration.