compatibility with sha512

These changes add support for sha512 hashing algorithm. This is often required for compatibility with applications that don't support bcrypt.

I am far from an expert on this level, but these changes work fine on our setup. What are your thoughts?
Shouldn't this be done in the same way as on line 232, for consistency? Or the other way around.
```php
$rounds = isset($options['rounds']) ? $options['rounds'] : 5000;
```