avoid infinite loops on windows.

I don't think obtaining a shared lock is necessary.  It is also not portable and consistently puts native windows Perl into an infinite loop.  I've also added a timeout so that if for some reason the lock tries to wait forever it won't.