more correct unlock functions
perl 5.18 support added (travis-ci)