fixed compilation for disabled compat/legacy API