The president took a swipe at Russia and Turkey, without naming them, for having ulterior motives in getting involved in Libya.