In the first place, we would like to stress that Islam is not against jokes. Good humor is part of Islam. Many books of Hadith have chapters on the humor of the Prophet (peace and blessings be upon him). These are called An-Nawadir or Al-Fukahah.
However, the Islamic position is that even in jokes one should not tell a lie or laugh at or ridicule the laws of Allah or else scratch his morality by laughing at sexual jokes such as the case referred to in the question. Allah Almighty says in the Qur’an: “If you question them, they declare (with emphasis); ‘We were only talking idly and in play.’ Say: ‘Was it at Allah, and His Signs, and His Messenger that you were mocking?'” (At-Tawbah: 65)
With the above in mind, we can say that laughing at sexual jokes doesn’t render one a non-Muslim. However, each and every Muslim should avoid all acts and sayings that are likely to scratch his morality as stated above.