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