GNU TLS related compilation fixes