An earthquake measuring 5.9 has hit an area near the Costa Rican capital late on Friday, the US government