experimental patch to enable compatibility with php safe_mode