core: use application:get_env/2 as application:get_env/3 is not available on R15
Issue #767