Register lock method for Libav 0.8.