Bush says he was within the law in authorizing spy program