[build] Fix the build for NET_4_5 (and maybe other profiles) from the pull request 981