Boundary conditions for electromagnetic field on the surface of media with weak spatial dispersion