An Opial-type inequality with an integral boundary condition