Fix es_fopenmem and es_mopen bug.