OpenCV static library does not delete TLS storage (Bugfix #2499)