Add atomicModifyIORef' for base ealier than 4.6.0.0