RF-11973: fixed menu.js issue (JS API incompatibility in RF5)