Fix and clean up libcoap build