These functions are not threadsafe (maybe the Windows ones are - not sure), so we need to figure out a way to expose them in a safe way.