Add travis-ci config for 1.18 branch
Don't use -dylib-install-name on OS X with GHC > 7.8.

Fixes #1660. Based on a patch by Christiaan Baaij.