fix newmessages() for compat with both HHVM && PHP