Search for intermediate mass black hole binaries in the first and second observing runs of the Advanced LIGO and Virgo network