See: https://github.com/travis-ci/travis.rb/issues/380
As a first step to updating dependencies while maintaining compatibility, extract common simple platform detection helpers.