android: Fix divide-by-zero with no threads