Panthers top Bears, 24-17, in sloppy preseason opener