Fix the Travis configuration

exit should not be used in script commands, because it exits the whole build script.
Thus, turning a failure exit code into another failure exit code is not needed.
Merge pull request #3486 from stof/patch-1

Fix the Travis configuration