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

(cherry picked from commit 03c0067272caae88758fd7847689177c0e18b48d)