switch to (more portable) fcntl locks