With LED lighting you often won't have any idea what frequency it cycles so you'd need to use trial and error. There's a reason why photographers prefer to not shoot under light sources that cycle, especially if it's the primary light source.
Cycling lights can also cause issues with uneven wight balance as well as exposure. Choosing shutter speeds that allow the lights to have full cycles gives best results.
Slower shutter speed will usually be better(likely why the M8 did better under those LED lights-slower lens & possible set lower ISO) since lights can fully cycle possibly multiple times(depending on how slow). Really high shutter speeds can also capture an even exposure but may have issues with wight balance if the lights color temp varies while cycling(I'm not sure how LED lights are with this but florescent light color temp can vary a lot).
I usually don't bother worrying much about not getting a perfect shot under these types of lighting since it's usually just a snap shot, if a wanted to take a good photo I wouldn't be uses this type of light as primary light source(I also wouldn't be using my Z2, although that's because I have proper camera gear but I understand some peoples best camera is their camera phone or as the saying goes the best camera for the shot is the one you have with you).
Sent from my D6503 using Xparent Red Tapatalk 2