Prevent JS error when buttonGroup with no buttons is initialized. Fix #363.