Synthesis and antibacterial activity of 5-ylidenethiazolidin-4-ones and 5-benzylidene-4,6-pyrimidinediones.