Make F_SETLKW operations switchable.

Resolves #717.