fix build system for examples
travis: build in separated dir, build examples