Don't crash when drawing borders on 0-size boxes (fix #146)