Section 19. The sentence to imprisonment of a female convicted of a felony shall be executed in the Massachusetts Correctional Institution, Framingham; or the court imposing sentence in such a case may impose the sentence in a jail or house of correction provided by law in the case of male prisoners, if it does not exceed two and one half years.