Use wrapper functions in try_lock_wrapper rather than using declarations, as the latter confuse some compilers