Make the import of WindowsLock conditional