Lunar precursor effects in the solar wind and terrestrial magnetosphere