Onset of thermal convection in a porous layer with mixed boundary conditions