Made some interface functions with ISO_C_BINDING to be re-entrant.