Improved compatibility of mkdirpSync