Japan’s space agency, hoping to prevent its first interplanetary probe from crashing into Mars, is scrambling to fix an on-board glitch before the spacecraft reaches the planet next month, an agency official said Friday. Launched in 1998, the Nozomi orbiter was sent to study the upper atmosphere of Mars but has been plagued with problems, which persist despite repeated attempts to correct them.