Check return value of crypt() such that the check matches the PHP documentation

As discussed in https://github.com/zendframework/zf2/pull/4623

Reference: http://php.net/manual/en/function.crypt.php