opencl: Make init_mtx static with volatile lock

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>