cmake: build with libpng 1.5 (from OpenBSD ports)
(cherry picked from commit 97e7ab882ec278e18797b4992e9664faef8f8927)
pthreads: disable the default PTHREAD_MUTEX_STRICT_NP behaviour for OpenBSD
(cherry picked from commit 46be9a13a0bb54aeb28f01fb0d718247aba773d1)