posix: Fix NULL pointer access in pthread_create()