A thread-safe version of imlib2 with thread-local contexts