Adding password-compat code for PHP 5.4