If a hashing method that was used to hash a password is not available then it is impossible to reset a password via the web interface (even with forgot password)
The current solution is to null the passwordHash field in mysql or possibly use the accountadmin tool.
I ran into this situation somehow where I installed phab on PHP 5.4 (no bcrypt) yet somehow the admin's password was hashed using bcrypt. When attempting to login or change the password it is not possible to change the password as an exception is being generated that bcrypt is not available and to upgrade PHP.