South Korea's military said it had detected an "unidentified projectile" launched by Pyongyang towards the Sea of Japan.