core: fix compilation of plugin API functions (macros) when compiler optimizations are enabled (closes #200)