No building which houses a nonconforming use shall be enlarged or structurally altered except to make it comply with requirements of health and safety laws or ordinances; provided further, that the cost of such work shall not exceed 50 percent of the market value of such building or structure at the time such work is done.