Section 3A. Notwithstanding the provisions of any general or special law to the contrary, a person receiving compensation from the commonwealth for services performed for the commonwealth who is not eligible for membership in the state retirement system shall be subject to the provisions of section sixty-four of chapter twenty-nine.