Black hole phase transitions and the chemical potential