Capacity mechanisms in imperfect electricity markets