Microprudential Regulation in a Dynamic Model of Banking