Singlet fermionic dark matter and the electroweak phase transition