fixed static compilation for C