Build fixes for musl libc.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>