Add feature check code to remove the build macro