Sweden confirms foreign sub in its waters