common/hooks.c: handle null attr in pthread_rwlock_init

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>