cleanup extern 'C' stuff