restored gcc4.6 compatibility on MacOS