Conditionally define memory allocation wrappers