Monaco moved back to second in Ligue 1 with a hard-fought 1-0 win over 10-man Ajaccio at the Stade Louis II.