solaris does not have flock

allow the gem to be compiled under OpenSolaris/Illumos and probably Solaris.
There must be a better define than "sun" but I am tired of looking for it so this will do...

it should not impact the other supported platforms.