Fixed error message on non-Windows environments

Replaces pull request #1138.