compatible with 1.8.7

Acked-by: Yuan He <lendage@gmail.com>