The masses of the cataclysmic variables AC Cancri and V363 Aurigae